package com.tomtom.amelinium.chartservice.config;

public class GoogleChartConfig {
public static final String script_head = "<script type=\"text/javascript\" src=\"https://www.google.com/jsapi\"></script>\n<script type=\"text/javascript\">\n";
public static final String main_div = "<div id=\"chart_tab_content\" >\n	<div id=\"top_div\" style=\"width: 900px; margin-left: 870px\">\n	<input type=\"button\" value=\"Edit\" onclick='$(\"#chart_tab_content\").load(\"${pageContext.request.contextPath}/web/planning/chart/edit\");'></input></div>\n	<div id=\"configuration_div\" style=\"width: 400px; margin-left: 150px\"></div>\n	<div id=\"chart_div\" style=\"width: 900px;\"></div>\n	<h3 style=\"margin-left: 150px\">Roadmap</h3>\n	<div id=\"roadmap_div\" style=\"width: 600px; margin-left: 150px\"></div>\n	<div id=\"burned_div\" style=\"width: 180px;  margin-left: 150px\"></div>\n	<p style=\"margin-left: 150px\">Autocorrection log</p>\n	<div id=\"log_div\" style=\"width: 600px;  margin-left: 150px\"></div>\n</div>\n";
public static final String setter = "google.load('visualization', '1', {packages:['table','corechart']});\ngoogle.setOnLoadCallback(drawConfigurationTable,true);\ngoogle.setOnLoadCallback(drawChart,true);\ngoogle.setOnLoadCallback(drawRoadmap,true);\ngoogle.setOnLoadCallback(drawLogTable,true);\n";

public static final String configuration_head = "function drawConfigurationTable() {\nvar data = google.visualization.arrayToDataTable([";
public static final String configuration_tail = "]);\n\n	        var table = new google.visualization.Table(document.getElementById('configuration_div'));\n	        table.draw(data, {showRowNumber: false});\n	      }\n";

public static final String chart_head = "function drawChart() {\nvar data = google.visualization.arrayToDataTable([\n";
public static String chart_tail = "]);\n\n    var options = {\n      title: 'test chart',\ncurveType: 'none',\n              width: 1000, height: 600,\n              vAxis: {maxValue: 10, gridlines: {count: 15}},\n       hAxis: {maxValue: 10, gridlines: {count: 20}},\n       backgroundColor: { fill:'transparent' }\n    };\n\n    var chart = new google.visualization.LineChart(document.getElementById('chart_div'));\n    chart.draw(data, options);\n  }\n";

public static final String roadmap_head = "function drawRoadmap() {\nvar data = google.visualization.arrayToDataTable([\n";
public static final String roadmap_tail = "]);\n\n    var table = new google.visualization.Table(document.getElementById('roadmap_div'));\n    table.draw(data, {showRowNumber: false});\n  }\n";

public static final String log_head = "function drawLogTable() {\nvar data = google.visualization.arrayToDataTable([\n";
public static final String log_tail = "	  ]);\n\n	        var table = new google.visualization.Table(document.getElementById('log_div'));\n	        table.draw(data, {showRowNumber: false});\n	      }\n";

public static final String script_tail = "</script>\n";

}
